<template>
  <BasicDrawer 
    v-bind="$attrs" 
    @register="register" 
    title="预览" 
    width="750px" 
    showFooter
  >
    <RenderPage :config="config" :test="config"/>
    <!-- <template #footer>
      <Button @click="handleCopy">复制JSON</Button>
      <Button @click="handleCopy" type="primary">导出JSON</Button>
    </template> -->
  </BasicDrawer>
</template>
<script lang="ts" setup>
import { ref, computed, unref, reactive } from 'vue';
import { Button } from 'ant-design-vue'
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
import { useMessage } from '/@/hooks/web/useMessage';
import RenderPage from '../render-page/RenderPage.vue'
const { createMessage } = useMessage();
const emit = defineEmits(['register', 'success']);
const config = ref()
const [register, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
  config.value = data.config
  setDrawerProps({  })
});

</script>
